{% extends "base.html" %}
{% load djblets_deco %}
{% load i18n %}
{% load reviewtags %}

{% block title %}{% trans "Screenshot" %}{%if screenshot.caption %}: {{screenshot.caption}}{% endif %}{% endblock %}
{% block extrahead %}
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/yui-ui.css" />
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/diffviewer.css" />
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/reviews.css" />
<script language="javascript" src="{{MEDIA_URL}}yui/utilities/utilities.js"></script>
<script language="javascript" src="{{MEDIA_URL}}yui-ext/yui-ext.js"></script>
<script language="javascript" src="{{MEDIA_URL}}rb/scripts/rb/common.js"></script>
<script language="javascript" src="{{MEDIA_URL}}rb/scripts/rb/widgets.js"></script>
<script language="javascript" src="{{MEDIA_URL}}rb/scripts/comments.js"></script>
<ascript language="javascript" src="{{MEDIA_URL}}rb/scripts/diffviewer.js"></script>
<script language="javascript" src="{{MEDIA_URL}}rb/scripts/screenshots.js"></script>
<script language="javascript">
  var gReviewRequestPath = '{{review_request.get_absolute_url}}';
  var gReviewRequestId = '{{review_request.id}}';
  var gScreenshotId = '{{screenshot.id}}';
  {% if diffset %}var gRevision = '{{diffset.revision}}';{% else %}var gRevision = 'None';{% endif %}
  {% if interdiffset %}
   var gInterdiffRevision = '{{interdiffset.revision}}';
  {% else %}
   var gInterdiffRevision = null;
  {% endif %}
  var gUserAuthenticated = {{user.is_authenticated|lower}};
</script>
{% endblock %}

{% block content %}
{% box "review-request"%}
 <ul id="topcontrols">
  <li><a href="{{review_request.get_absolute_url}}"><img src="{{MEDIA_URL}}rb/images/reviewrequest.png" width="16" height="16" border="0" alt="" /> {% trans "View Review Request" %}</a></li>
 </ul>
 <div class="main">
  <h1 id="summary"><a href="{{review_request.get_absolute_url}}">{{review_request.summary}}</a></h1>
  <div class="content">
  {% trans "Screenshots:" %}<br />
{% include "reviews/screenshotindex.html" %}
  </div>
 </div>
 <ul class="controls">
  <li><a href="#" onClick="showReviewDlg();" id="review-link">{% trans "Review" %}</a></li>
 </ul>
{% endbox %}

{% spaceless %}
<div id="screenshot-display">
 <img src="{{screenshot.image.url}}" alt="{{screenshot.caption}}" />
</div>
{% endspaceless %}

<script language="javascript">
  addComments({% screenshotcommentcounts screenshot %});
</script>

{% include "reviews/screenshotindex.html" %}
{% include "diffviewer/comments_dlg.html" %}

{% endblock %}
